// components/swiper/swiper-cache.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    navActive: {
      type: Number,
      value: 0
    },
    navList: {
      type: Array,
      value: []
    },
    navListData: {
      type: Array,
      value: []
    },
    refresherTriggered: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onSwiperChnage: function(e) {
      console.log(e);
      if (e.detail.source !== 'touch') {
        return false
      }
      this.onSetScrollTop()
      // return false;
      this.setData({
        navActive: e.detail.current
      })
      const currentItemData = this.getCurrentItemData()
      if (currentItemData.list.length === 0) {
        // this.onSearch()
      }
    },
  }
})
